package cn.zwx.member.svc.rpc.dto;

import lombok.Data;
import org.apache.dubbo.apidocs.annotations.RequestParam;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author zhangwenxue
 */
@Data
public class ModifyPasswordDTO {

    @NotBlank(message = "用户id不能为空")
    @RequestParam(value = "用户id",description = "用户id",required = true)
    private String userId;

    @NotBlank(message = "原密码不能为空")
    @RequestParam(value = "原密码",description = "原密码",required = true)
    public String sourcePassword;

    @NotBlank(message = "新密码不能为空")
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{6,18}$",message = "必须包含大小写字母和数字的组合,长度在6-18之间")
    @RequestParam(value = "新密码",description = "新密码",required = true)
    public String targetPassword;
}
